<!--Descriptive page name, messages and instructions-->
<h2>
	<%=h @series.title %>
	<% if @series.restricted %>
		<%= image_tag("lockblue.png", :size => "15x15", :alt => "(Restricted)", :title => "Restricted") %>
	<% end %>
</h2>
<!--/descriptions-->

<!--subnav-->
<% if logged_in? %>
<h3 class="landmark">Actions</h3>
<ul class="navigation" role="navigation">
  <li><%= bookmark_link(bookmarkable=@series, blurb=false) %></li>
  <% if is_author_of?(@series) %>
    <li><%= link_to "Edit", edit_series_path(@series) %></li>
    <li><%= link_to 'Delete Series', @series, :confirm => 'Are you sure?', :method => :delete %></li>
    <li><%= link_to "Reorder Series", manage_series_path(@series) %></li>
    <li><%= link_to t('.orphan_series', :default => 'Orphan Series'), {:controller => 'orphans', :action => 'new', :series_id => @series.id} %></li>    	
    <% unless (@series.pseuds - current_user.pseuds).empty? %>
      <li><%= link_to t('.remove_me_as_author', :default => 'Remove Me As Author'), edit_series_path(@series, :remove => 'me'), :confirm => series_removal_confirmation(@series, current_user) %></li>
    <% end %>
  <% end %>
</ul>
<% end %>
<!--/subnav-->

<!--main content-->
<h3 class="landmark">Series Metadata</h3>
<div class="wrapper">
	<dl class="series meta">
    <dt><%=h 'Series begun:' %></dt>
    <dd><%=h @series.published_at.to_date %></dd>
    <dt><%=h 'Series updated: ' %></dt>
    <dd><%= @series.revised_at ? @series.revised_at.to_date : @series.published_at %></dd>

    <dt><%=h 'Works included:' %></dt>
    <dd><%= @series.visible_work_count %></dd>

    <dt><%=h 'Complete:' %></dt>
    <dd><%= @series.complete? ? "Yes" : "No" %></dd>

    <dt><%=h 'Word count:' %></dt>
    <dd><%= number_with_delimiter(@series.visible_word_count) %></dd>

    <% if @series.pseuds.many?%>
      <dt><%=h 'Authors:' %></dt>
      <dd><%= byline(@series) %></dd>
    <% else %>
      <dt><%=h 'Author:' %></dt>
      <dd><%= byline(@series) %></dd>
    <% end %>

  <% unless @series.summary.blank? %>
      <dt><%=h 'Description:' %></dt>
      <dd><blockquote class="userstuff"><%=raw sanitize_field(@series, :summary) %></blockquote></dd>
	<% end %>
	<% unless @series.notes.blank? %>
      <dt><%=h 'Notes:' %></dt>
      <dd><blockquote class="userstuff"><%=raw sanitize_field(@series, :notes) %></blockquote></dd>
	<% end %>
</dl>
</div>
<div id="dynamic-bookmark" style="display:none;">	
</div>

<% if logged_in_as_admin? %>
<!-- BEGIN admin options -->
<%= render :partial => 'admin/admin_options', :locals => {:item => @series} %>
<% end %>

<h3 class="landmark">List of Series</h3>
<ul class="series work index<% if is_author_of?(@series) %> works-own<% end %>">
  <% for serial in @serial_works %>
    <%= render :partial => 'works/work_blurb', :locals => {:work => serial.work} %>
  <% end %>
</ul>
<!--/content-->

<!--subnav-->
<!--/subnav-->
